
import flash.events.Event;
import flash.external.ExternalInterface;
import flash.net.URLRequest;
import flash.net.navigateToURL;

import mx.collections.*;
import mx.controls.Alert;
import mx.core.FlexGlobals;
import mx.events.CloseEvent;
import mx.events.FlexEvent;
import mx.events.MenuEvent;
[Bindable]
public var menuBarCollection:XMLListCollection;

private var menubarXML:XMLList =
	<>
	<menuitem label="运营监控专区" data="top">
		<menuitem label="运营监控分析" data="com/ailk/kbi/kbirazor/kbr.swf" height="850"/>
		<menuitem label="静态节点" data="com/ailk/kbi/kbirazor/kbrStatic.swf" height="850"/>
	</menuitem>
	</>;

private function initCollections():void {
	menuBarCollection = new XMLListCollection(menubarXML);
	mBar.visible = true;
}

public function menuHandler(event:MenuEvent):void  {
	if (event.item.@data != "top") {
		//		swfloader.source=(event.item.@data).toString();
		swfloader.unloadModule();
		swfloader.url=(event.item.@data).toString();
		swfloader.loadModule();
		this.height  = int(event.item.@height);
		ExternalInterface.call("updateHeight", String(this.height));
	}        
}